#include "BSpline.h"

BSpline<3> cardinal_3D(int left_bound, int right_bound, const Function& f){
    vector<double> knots;
    for(;left_bound <= right_bound; left_bound++){
        knots.push_back(static_cast<double>(left_bound));
    }
    vector<double> sites(knots);
    return BSpline<3>(knots, sites, f, order3);
}

BSpline<2> cardinal_2D(int left_bound, int right_bound,
                        const vector<double>& sites, const Function& f){
    vector<double> knots;
    for(;left_bound <= right_bound; left_bound++){
        knots.push_back(static_cast<double>(left_bound));
    }
    return BSpline<2>(knots, sites, f, order2);
}